﻿/**********************************************************************
 * @file   GraphVTKObjectModelBase.h
 * @brief  模型渲染对象基类
 * @author ZhouZhaoYi (zhouzhaoyi@diso.cn)
 * @date   2025-09-17
 *********************************************************************/
#ifndef _GRAPHVTKOBJECTMODELBASE_H__
#define _GRAPHVTKOBJECTMODELBASE_H__

#include "GraphDataVTKAdaptorAPI.h"
#include "GraphVTKObject3D.h"
#include "GraphVTKCommons.h"

class vtkActor;
class vtkMapper;

namespace Exchange {
    class GraphVTKObjectHighlighting;

    /**
     * @brief  模型渲染对象基类
     * @author ZhouZhaoYi (zhouzhaoyi@diso.cn)
     * @date   2025-09-17
     */
    class GraphDataVTKAdaptorAPI GraphVTKObjectModelBase : public GraphVTKObject3D
    {
        FITKGraphObjectRegist(GraphVTKObjectModelBase, GraphVTKObject3D);
        FITKCLASS(Exchange, GraphVTKObjectModelBase);
    public:
        /**
         * @brief  构造函数
         * @author ZhouZhaoYi (zhouzhaoyi@diso.cn)
         * @date   2025-09-17
         */
        GraphVTKObjectModelBase(Core::FITKAbstractDataObject* dataObj);

        /**
         * @brief  析构函数
         * @author ZhouZhaoYi (zhouzhaoyi@diso.cn)
         * @date   2025-09-17
         */
        virtual ~GraphVTKObjectModelBase() = default;

        /**
         * @brief    高亮显示
         * @param[i] color 颜色
         * @author   ZhouZhaoYi (zhouzhaoyi@diso.cn)
         * @date     2025-09-17
         */
        virtual void highlight(QColor color = QColor()) override;

        /**
         * @brief    取消高亮
         * @param[i] details 细节信息
         * @return   void
         * @author   ZhouZhaoYi (zhouzhaoyi@diso.cn)
         * @date     2025-09-17
         */
        virtual void disHighlight() override;

    protected:
        /**
         * @brief  初始化
         * @author ZhouZhaoYi (zhouzhaoyi@diso.cn)
         * @date   2025-09-17
         */
        virtual void init();

    protected:
        GraphVTKObjectHighlighting* m_graphObjHighlight{ nullptr }; ///< 高亮对象
    };
};

#endif // !_GRAPHVTKOBJECTMODELBASE_H__